Start=function(){
    	ImageFigure.call(this,"Play.png");
    	this.outputPort=null;
    	this.setDimension(32,32);
    	return this;
    	};
    Start.prototype=new ImageFigure();
    Start.prototype.type="Start";
    Start.prototype.setWorkflow=function(_5956){
    ImageFigure.prototype.setWorkflow.call(this,_5956);
    if(_5956!==null&&this.outputPort===null){
    	this.outputPort=new MyOutputPort();
    	this.outputPort.setWorkflow(_5956);
    	this.outputPort.setMaxFanOut(1);
    	this.outputPort.setName("outputPort");
    	this.outputPort.setBackgroundColor(new Color(245,115,115));
    	this.addPort(this.outputPort,this.width,this.height/2);
    }
};
    	
Exit=function(){
    		ImageFigure.call(this,"Stop.png");
    		this.outputPort=null;
    		this.setDimension(32,32);
    		return this;
   		};
    Exit.prototype=new ImageFigure();
    Exit.prototype.type="Exit";
    Exit.prototype.setWorkflow=function(_5956){
    ImageFigure.prototype.setWorkflow.call(this,_5956);
    if(_5956!==null&&this.outputPort===null){
    		this.inputPort=new MyInputPort();
    		this.inputPort.setWorkflow(_5956);
    		this.inputPort.setName("inputPort");
    		this.inputPort.setBackgroundColor(new Color(245,115,115));
    		this.addPort(this.inputPort,0,this.height/2);
    }
};
    		
    		
 OneToTwo=function(){
     		ImageFigure.call(this,"/studentflow/ext-3.2.1/images/one_two.png");
       		this.outputPort=null;
       		this.setDimension(56,64);
       		return this;
       		};
       		OneToTwo.prototype=new ImageFigure();
       		OneToTwo.prototype.type="OneToTwo";
       		OneToTwo.prototype.setWorkflow=function(_5956){
       		ImageFigure.prototype.setWorkflow.call(this,_5956);
		if(_5956!==null&&this.outputPort===null){
     				this.outputPort1=new MyOutputPort();
       				this.outputPort1.setWorkflow(_5956);
       				this.outputPort1.setMaxFanOut(4);
       				this.outputPort1.setName("outputPort");
       				this.outputPort1.setBackgroundColor(new Color(245,115,115));
       				this.addPort(this.outputPort1,this.width,this.height/4);
       				this.outputPort3=new MyOutputPort();
       				this.outputPort3.setWorkflow(_5956);
       				this.outputPort3.setMaxFanOut(4);
       				this.outputPort3.setName("outputPort1");
       				this.outputPort3.setBackgroundColor(new Color(245,115,115));
       				this.addPort(this.outputPort3,this.width,this.height/1.3);
       				this.inputPort=new MyInputPort();
      	    		this.inputPort.setWorkflow(_5956);
       	    		this.inputPort.setName("inputPort");
       	    		this.inputPort.setBackgroundColor(new Color(245,115,115));
     				this.addPort(this.inputPort,0,this.height/2);
  				}
        };
        		
TwoToOne=function(){
       		ImageFigure.call(this,"/studentflow/ext-3.2.1/images/two_one.png");
         	this.outputPort=null;
            this.setDimension(56,64);
            return this;
            };
            TwoToOne.prototype=new ImageFigure();
            TwoToOne.prototype.type="TwoToOne";
            TwoToOne.prototype.setWorkflow=function(_5956){
            ImageFigure.prototype.setWorkflow.call(this,_5956);
         if(_5956!==null&&this.outputPort===null){
        	 this.outputPort1=new MyOutputPort();
             this.outputPort1.setWorkflow(_5956);
             this.outputPort1.setMaxFanOut(4);
             this.outputPort1.setName("outputPort");
             this.outputPort1.setBackgroundColor(new Color(245,115,115));
             this.addPort(this.outputPort1,this.width,this.height/2);		
             this.inputPort=new MyInputPort();
             this.inputPort.setWorkflow(_5956);
             this.inputPort.setName("inputPort");
             this.inputPort.setBackgroundColor(new Color(245,115,115));
             this.addPort(this.inputPort,0,this.height/4);
             this.inputPort1=new MyInputPort();
             this.inputPort1.setWorkflow(_5956);
             this.inputPort1.setName("inputPort1");
             this.inputPort1.setBackgroundColor(new Color(245,115,115));
             this.addPort(this.inputPort1,0,this.height/1.3);
		}
};
    		
	
Activity=function(){
		ImageFigure.call(this,"/studentflow/ext-3.2.1/images/activity.png");
		this.outputPort=null;
		this.setDimension(100,70);
		return this;
		};
		Activity.prototype=new ImageFigure();
		Activity.prototype.type="Activity";
		Activity.prototype.setWorkflow=function(_5956){
		ImageFigure.prototype.setWorkflow.call(this,_5956);
	if(_5956!==null&&this.outputPort===null){
		this.outputPort=new MyOutputPort();
		this.outputPort.setWorkflow(_5956);
		this.outputPort.setMaxFanOut(1);
		this.outputPort.setName("outputPort");
		this.outputPort.setBackgroundColor(new Color(245,115,115));
		this.addPort(this.outputPort,this.width,this.height/2);
		this.inputPort=new MyInputPort();
		this.inputPort.setWorkflow(_5956);
		this.inputPort.setName("inputPort");
		this.inputPort.setBackgroundColor(new Color(245,115,115));
		this.addPort(this.inputPort,0,this.height/2);
	}
};
		
		
SupportActivity=function(){
		ImageFigure.call(this,"/studentflow/ext-3.2.1/images/support-activity.png");
		this.outputPort=null;
		this.setDimension(100,70);
		return this;
		};
		SupportActivity.prototype=new ImageFigure();
		SupportActivity.prototype.type="SupportActivity";
		SupportActivity.prototype.setWorkflow=function(_5956){
		ImageFigure.prototype.setWorkflow.call(this,_5956);
		if(_5956!==null&&this.outputPort===null){
			this.outputPort=new MyOutputPort();
			this.outputPort.setWorkflow(_5956);
			this.outputPort.setMaxFanOut(1);
			this.outputPort.setName("outputPort");
			this.outputPort.setBackgroundColor(new Color(245,115,115));
			this.addPort(this.outputPort,this.width,this.height/2);
			this.inputPort=new MyInputPort();
			this.inputPort.setWorkflow(_5956);
			this.inputPort.setName("inputPort");
			this.inputPort.setBackgroundColor(new Color(245,115,115));
			this.addPort(this.inputPort,0,this.height/2);
		}
};
		
ContextmenuConnection=function(){
	Connection.call(this);
	this.sourcePort=null;
	this.targetPort=null;
	this.lineSegments=[];
	this.setColor(new Color(128,128,255));
	this.setLineWidth(1);
};
	ContextmenuConnection.prototype=new Connection();
	ContextmenuConnection.prototype.getContextMenu=function(){
	var menu=new Menu();
	var oThis=this;
	menu.appendMenuItem(new MenuItem("NULL Router",null,function(){
	oThis.setRouter(null);
	}));
	menu.appendMenuItem(new MenuItem("Manhatten Router",null,function(){
	oThis.setRouter(new ManhattanConnectionRouter());
	}));
	menu.appendMenuItem(new MenuItem("Bezier Router",null,function(){
	oThis.setRouter(new BezierConnectionRouter());
	}));
	menu.appendMenuItem(new MenuItem("Fan Router",null,function(){
	oThis.setRouter(new FanConnectionRouter());
	}));
	return menu;
};

MyInputPort=function(_62be){
		InputPort.call(this,_62be);
		};
		MyInputPort.prototype=new InputPort();
		MyInputPort.prototype.type="MyInputPort";
		MyInputPort.prototype.onDrop=function(port){
		if(port.getMaxFanOut&&port.getMaxFanOut()<=port.getFanOut()){
			return;
		}
		if(this.parentNode.id==port.parentNode.id){
		}else{
			var _62c0=new CommandConnect(this.parentNode.workflow,port,this);
			_62c0.setConnection(new ContextmenuConnection());
			this.parentNode.workflow.getCommandStack().execute(_62c0);
		}
};

				
MyOutputPort=function(_4b07){
		OutputPort.call(this,_4b07);
		};
		MyOutputPort.prototype=new OutputPort();
		MyOutputPort.prototype.type="MyOutputPort";
		MyOutputPort.prototype.onDrop=function(port){
		if(this.getMaxFanOut()<=this.getFanOut()){
			return;
		}
		if(this.parentNode.id==port.parentNode.id){
		}else{
			var _4b09=new CommandConnect(this.parentNode.workflow,this,port);
			_4b09.setConnection(new ContextmenuConnection());
			this.parentNode.workflow.getCommandStack().execute(_4b09);
		}
};
					
LabelConnection=function(){
		Connection.call(this);
		var label=new Label("Message");
		label.setBackgroundColor(new Color(230,230,250));
		label.setBorder(new LineBorder(1));
		this.addFigure(label,new ManhattanMidpointLocator(this));
};
		LabelConnection.prototype=new Connection();
		LabelConnection.prototype.type="LabelConnection";


							
							